import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/widget/button/radius_button.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:boss/ui/widget/form/base_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:router/annotation.dart';

@RouterConfig(MiniProgramQrMailPage.pageName)
class MiniProgramQrMailPage extends StatefulWidget {
  static const pageName = '/MiniProgramQrMailPage';

  @override
  _MiniProgramQrMailPageState createState() => _MiniProgramQrMailPageState();
}

class _MiniProgramQrMailPageState extends BaseState<MiniProgramQrMailPage> {
  _MiniProgramQrMailPageState() : super(MiniProgramQrMailPage.pageName);

  String email = '';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CenterTitleAppBar(title: '发送到邮箱'),
      body: SingleChildScrollView(
        padding: EdgeInsets.symmetric(horizontal: 30.w, vertical: 20.w),
        child: Column(
          children: [
            BaseTextFormField(
              hintText: '请输入邮箱地址',
              textAlign: TextAlign.start,
              keyboardType: TextInputType.emailAddress,
              onChanged: (value) {
                email = value;
              },
            ),
            RadiusButton(
              width: double.infinity,
              title: '确认发送',
              margin: EdgeInsets.symmetric(vertical: 30.w),
            ),
            Text(
              '邮件需要耗时几分钟才能到达，请耐心等待。若在邮箱中找不到，可能被误认为垃圾邮件，请到垃圾箱查找。',
              style: TextStyleConstant().normal_3_22,
            ),
          ],
        ),
      ),
    );
  }
}
